package app.cn.com.school.fragment

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import app.cn.com.school.R
import app.cn.com.school.adapter.NewsItemAdapter
import app.cn.com.school.databinding.FragmentNewsBinding

/**
 * Created by Administrator on 2017/11/3 0003.
 */
class NewsFragment : BaseFragment<FragmentNewsBinding>() {
    override fun initBindingVar() {
    }

    fun newInstance(number: Int): Fragment {
        var bundle = Bundle()
        bundle.putInt("type", number)
        val fragment = NewsFragment()
        fragment.arguments = bundle
        return fragment
    }

    var adapter: NewsItemAdapter? = null
    var mNumber: Int? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mNumber = arguments.getInt("type")
    }

    override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        initBinding(R.layout.fragment_news, container)
        mView = binding.root
        return super.onCreateView(inflater, container, savedInstanceState)
    }


}